import request from '@/utils/request'

//新增企业
export function save(data) {
  return request({
    url: '/jms/jmsCompany/save',
    method: 'post',
    data: data
  })
}

//删除企业
export function deleteCompany(id) {
    return request({
      url: '/jms/jmsCompany/delete/'+id,
      method: 'get',
    })
}

//修改企业
export function update(data) {
  return request({
    url: '/jms/jmsCompany/update',
    method: 'post',
    data: data
  })
}


//根据ID查询企业
export function findById(id) {
  return request({
    url: '/jms/jmsCompany/findById/'+ id,
    method: 'get',
  })
}

//分页查询
export function findByPage(data) {
  return request({
    url: '/jms/jmsCompany/findByPage',
    method: 'post',
    data: data
  })
}


//查询全部注册企业
export function findAll() {
  return request({
    url: '/jms/jmsCompany/findAll',
    method: 'get',

  })
}


//批量删除企业
export function deleteByBatch(data) {
  return request({
    url: '/jms/jmsCompany/deleteByBatch',
    method: 'post',
    data: data
  })
}


//企业审核通过
export function checkPass(id) {
  return request({
    url: '/jms/jmsCompany/checkPass/'+id,
    method: 'get',

  })
}

//企业审核不通过
export function checkRefuse(id) {
  return request({
    url: '/jms/jmsCompany/checkRefuse/'+id,
    method: 'get',

  })
}



//(网站前台)获取公司信息列表
export function getCompanyList(data) {
  return request({
    url: '/jms/jmsCompany/getCompanyList',
    method: 'post',
    data: data
  })
}

//(网站前台)根据企业ID查询企业详情
export function findDetailById(id) {
  return request({
    url: '/jms/jmsCompany/getCompanyDetail/'+id,
    method: 'get',
  })
}

//(网站前台)公司提交注册申请
export function registerCompany(data) {
  return request({
    url: '/jms/jmsCompany/registerCompany',
    method: 'post',
    data:data
  })
}
//获取公司账户信息
export function getCompanyInfo() {
  return request({
    url: '/jms/jmsCompany/getCompanyInfo',
    method: 'get',
  })
}
//修改企业信息
export function updateCompanyInfo(data) {
  return request({
    url: '/jms/jmsCompany/updateCompanyInfo',
    method: 'post',
    data:data
  })
}













